#ifndef COMMANDMANAGER_H
#define COMMANDMANAGER_H

#include <QDir>
#include <QFileSystemWatcher>
#include "IPlugin.h"
#include "Plugin.h"

class CommandManager : public Plugin, public IPlugin
{
   Q_OBJECT
   Q_INTERFACES(IPlugin)

public:
   CommandManager();

   Plugin* getPlugin();

   void parseCommandFile(const QFileInfo &file);

public slots:
   void slotStartService();
   void slotStopService();
   void slotConfigUpdate(const QString &key,
                         QVariant &value);
   void slotEventNotification(Event event);

   void slotCommandReceived(const QString &path);

protected:
   QFileSystemWatcher theDirWatcher;

};

#endif // COMMANDMANAGER_H
